import API from "../utils/request"




export default function login(params) { return API.post("http://localhost:8888/admin/login/status", params) }

export const Accesstothesong = () => API.get('http://localhost:8888/songList/allSongList')


export const Deletethelist = (id) => API.get(`http://localhost:8888/songList/delete?id=${id}`)


export const Songmanagements = (id) => API.get(`http://localhost:8888/listSong/detail?songListId=${id}`)


export const Songlistmanagements = (id) => API.get(`http://localhost:8888/song/detail?songId=${id}`)

export const Addplaylist = (id) => API.post(`http://localhost:8888/songList/add`, id)

export const Modifytheplaylist = (id) => API.post(`http://localhost:8888/songList/update`, id)



//删除详情页歌曲
export const deletesongId = (id, data) => API.get(`http://localhost:8888/listSong/delete?songId=${id}&songListId=${data}`)


// export const detailsongId = (id) => API.get(`http://localhost:8888/song/detail?songId=${id}`)


export const detailsongListId = (id) => API.get(`http://localhost:8888/listSong/detail?songListId=${id}`)

//用户管理
export const usermanagement = () => API.get(`http://localhost:8888/consumer/allConsumer`)
export const delConsumer = (id) => API.get(`http://localhost:8888/consumer/delete?id=${id}`)
//添加用户
export const consumeradd = (id) => API.post(`http://localhost:8888/consumer/add`, id)


export const updateuser = (id) => API.post(`http://localhost:8888/consumer/update`, id)
//修改用户






export const getAllSinger = () => API.get(`http://localhost:8888/singer/allSinger`);
export const setSinger = (id) => API.post(`http://localhost:8888/singer/add`, id);
export const delSinger = (id) => API.get(`http://localhost:8888/singer/delete?id=${id}`);
export const updateSinger = (id) => API.post(`http://localhost:8888/singer/update`, id);
export const updateSingerPic = (id) => API.get(`http://127.0.0.1:8888/singer/updateSingerPic?id=${id}`);
// export const songOfSingerId = (id) => API.get(`http://localhost:8888/song/singer/detail?singerId=${id}`);
export const songOfSingerId = () => API.get(`http://localhost:8888/song/singer/detail?singerId=7`);



export const listSongAdd = (id) => API.post(`http://127.0.0.1:8888/song/add`, id);
export const updateSong = (id) => API.post(`http://localhost:8888/song/update`, id);
export const delSong = (id) => API.get(`http://localhost:8888/song/delete?id=${id}`);
export const updateSongUrl = (id) => API.post(`http://127.0.0.1:8888/song/updateSongUrl?id=${id}`);
export const updateSongPic = (id) => API.post(`http://127.0.0.1:8888/song/updateSongPic?id=${id}`);